import request from '@/utils/request'
// 获取用户上次未保存的任务
export function getLatestUnsaveTask(query) {
    return request({
      url: '/kpRatingTask/new/getLatestUnsaveTask',
      method: 'get',
      params: query
    })
}
// 应用关联任务
export function applyGlTask(data) {
  return request({
    url: '/kpRatingTask/new/applyGlTask',
    method: 'post',
    data: data
  })
}

// 删除关联任务
export function deleteGlTask(query) {
  return request({
    url: 'kpRatingTask/new/deleteGlTask',
    method: 'get',
    params: query
  })
}

// 清空考评任务
export function cleanKpTask(query) {
  return request({
    url: 'kpRatingTask/new/cleanKpTask',
    method: 'get',
    params: query
  })
}
// 保存考评任务
export function saveKpTask(query) {
  return request({
    url: 'kpRatingTask/new/saveKpTask',
    method: 'get',
    params: query
  })
}
// 简本报告
export function getReportListByjb(query) {
  return request({
    url: '/report/getReportListByTaskId/jb',
    method: 'get',
    params: query
  })
}
// 详本报告
export function getReportListByxb(query) {
  return request({
    url: '/report/getReportListByTaskId/xb',
    method: 'get',
    params: query
  })
}
// 现场调查报告
export function getReportListByxcdc(query) {
  return request({
    url: '/samplingReport/getReportListByTaskId',
    method: 'get',
    params: query
  })
}
//考评任务管理接口
// 查询考评任务列表接口
export function kpRatingTaskList(query) {
  return request({
    url: '/kpRatingTask/list',
    method: 'get',
    params: query
  })
}
// 考评任务管理-考评任务详情
export function kpRatingTaskGetById(query) {
  return request({
    url: '/kpRatingTask/getById',
    method: 'get',
    params: query
  })
}

// 计算面积占比
export function areaProportionOperation(query) {
  return request({
    url: '/kpRatingTask/areaProportionOperation',
    method: 'get',
    params: query
  })
}
// 查询考评任务总的面积占比
export function getAreaRadio(query) {
  return request({
    url: '/kpRatingTask/getAreaRadio',
    method: 'get',
    params: query
  })
}
// 查询省份面积占比
export function getAreaRadioByProvinceId(query) {
  return request({
    url: '/kpRatingTask/getAreaRadioByProvinceId',
    method: 'get',
    params: query
  })
}

// 计算系统评分
export function systemScoreOps(query) {
  return request({
    url: '/kpRatingTask/systemScoreOps',
    method: 'get',
    params: query
  })
}

// 查询系统评分计算流程
export function getSystemScoreOpsing(query) {
  return request({
    url: '/kpRatingTask/getSystemScoreOpsing',
    method: 'get',
    params: query
  })
}
// 删除考评任务
export function deleteKpTask(query) {
  return request({
    url: '/kpRatingTask/deleteKpTask',
    method: 'get',
    params: query
  })
}
// 修改考评任务
export function updateKpTask(data) {
  return request({
    url: '/kpRatingTask/updateKpTask',
    method: 'post',
    data: data
  })
}
// 系统评分-关联任务得分详情 
export function getGlTaskScoreDetails(query) {
  return request({
    url: '/kpRatingTask/getGlTaskScoreDetails',
    method: 'get',
    params: query
  })
}
// 系统评分-关联任务得分详情  排名发布
export function getGlTaskScoreDetailsFinal(query) {
  return request({
    url: '/kpRatingTask/getGlTaskScoreDetailsFinal',
    method: 'get',
    params: query
  })
}


// 系统评分-计算省份系统评分
export function areaSystemScoreOps(query) {
  return request({
    url: '/kpRatingTask/areaSystemScoreOps',
    method: 'get',
    params: query
  })
}
// 系统评分-查询省份系统评分流程
export function getAreaSystemScoreOpsing(query) {
  return request({
    url: '/kpRatingTask/getAreaSystemScoreOpsing',
    method: 'get',
    params: query
  })
}


// 分发考评任务给专家
export function distributionKpTask2Expert(query) {
  return request({
    url: '/kpRatingTask/distributionKpTask2Expert',
    method: 'get',
    params: query
  })
}
// 查询任务的专家
export function getExpertByKrtId(query) {
  return request({
    url: '/kpRatingTask/getExpertByKrtId',
    method: 'get',
    params: query
  })
}
// 专家评分进度
export function expertScoreProgress(query) {
  return request({
    url: '/kpRatingTask/expertScoreProgress',
    method: 'get',
    params: query
  })
}

// 专家评分-得分详情
export function getExpertScoreDetails(query) {
  return request({
    url: '/kpRatingTask/getExpertScoreDetails',
    method: 'get',
    params: query
  })
}
// 专家评分-停止评分
export function stopTask(query) {
  return request({
    url: '/kpRatingTask/stopTask',
    method: 'get',
    params: query
  })
}
// 查看排名预览
export function previewRanking(query) {
  return request({
    url: '/kpRatingTask/previewRanking',
    method: 'get',
    params: query
  })
}
// 修改排名
export function updateRanking(data) {
  return request({
    url: '/kpRatingTask/updateRanking',
    method: 'post',
    data: data
  })
}
// 发布排名
export function publishRanking(query) {
  return request({
    url: '/kpRatingTask/publishRanking',
    method: 'get',
    params: query
  })
}
// 考评排名查看查询考评任务列表
export function taskList(query) {
  return request({
    url: '/kpRatingTask/rank/taskList',
    method: 'get',
    params: query
  })
}



